import { Image } from '@nutui/nutui-react-taro'
import { Text, View } from '@tarojs/components'
import './index.less'

interface ImageContentProps {
  src: string
  height?: number
  width?: number | string
  title?: string
  description?: string
  onClick?: () => void
}

const ImageContent = ({ src, title, description, onClick, height, width }: ImageContentProps) => {
  return (
    <View onClick={onClick} className='image-content'>
      <Image width={width} height={height} src={src} mode='aspectFill' radius={16}></Image>
      <Text className='title'>{title}</Text>
      <Text className='description'>{description}</Text>
    </View>
  )
}

export default ImageContent
